package com.kangtu.demointerceptortest.config;

import com.kangtu.demointerceptortest.filter.MyInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @program: demo-weix-pay
 * @description: WebMvcConfig
 * @author: 亮子说编程
 * @create: 2021-03-05 17:40
 **/
@Configuration
public class WebMvcConfig  implements WebMvcConfigurer {

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new MyInterceptor())
                .addPathPatterns("/**")
                .excludePathPatterns("/static/login.html");
    }


}
